package client.comm.baoding.ui

import android.content.Intent
import client.comm.commlib.utils.StoreUtil
import client.comm.baoding.R
import client.comm.baoding.adapter.page.HmjlFragmentPageAdapter
import client.comm.baoding.api.bean.UserInfo
import client.comm.baoding.databinding.ActivityHmjlBinding
import client.comm.baoding.ui.vm.HmjlViewModel
import client.comm.baoding.BaseMiddleActivity

/**
 * 股权记录
 */
class HmjlActivity : BaseMiddleActivity<HmjlViewModel, ActivityHmjlBinding>() {

    val user: UserInfo? by lazy {
        StoreUtil.getBean<UserInfo>(this@HmjlActivity)
    }
    val adapter: HmjlFragmentPageAdapter by lazy {
        HmjlFragmentPageAdapter(supportFragmentManager)
    }

    //所有，释放中，冻结中，
    override fun getLayout(): Int {
        return R.layout.activity_hmjl
    }

    override fun initViewModel(): HmjlViewModel = createViewModel()

    override fun initView() {
        binding.event = this
        binding.vm = viewModel
        binding.viewPager.adapter = adapter
        binding.tabLayout.setupWithViewPager(binding.viewPager)
    }

    fun gqsfjl() {
        startActivity(Intent(this, GqsfjlActivity::class.java))
    }

}